import request from '@/utils/request'

// 登录
export const userLogin = (data) => {
  return request.post('/sys/login', data)
}

// 获取 - 用户基本资料
export const userInfo = () => {
  return request.get('/sys/profile')
}

// 修改用户密码
export const userPassword = (data) => {
  return request.put('/sys/user/updatePass', data)
}

// pc端 - 获取加密串 - 用来生成二维码
export const getEncryption = () => {
  return request.get('/sys/qrcodeKey')
}

// pc端 - 获取加密串的状态
export const getEncryptionState = (qrcode_key) => {
  return request.get('/sys/qrcodeState', {
    params: {
      qrcode_key
    }
  })
}
